<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<html>
<head>
<link rel="stylesheet" type="text/css" href="/resources/main.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div id="headerBox">
		<a href="/event/list">Lista</a>&nbsp;<a href="/event/list?grp">Grupy</a>
	</div>
	<div id="contentBox">
		<table class="grid">
			<thead style="font-weight: bold;">
				<tr>
					<td>Insert date</td>
					<td>Update date</td>
					<td>Event group</td>
					<td>Event name</td>
					<td>Event date</td>
					<td>Event time</td>
					<td>Event URI</td>
			</thead>
			<tbody>
				<c:forEach var="item" items="${eventSources}" varStatus="status">
					<tr class="${status.count % 2 == 0 ? 'row-even' : 'row-odd' }">
						<td><fmt:formatDate value="${item.insertDate}" pattern="yyyy-MM-dd HH:mm:ss"
								timeZone="${timeZone}" /></td>
						<td><fmt:formatDate value="${item.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"
								timeZone="${timeZone}" /></td>
						<td><c:out value="${item.eventGroup}" /></td>
						<td><c:out value="${item.eventName}" /></td>
						<td><fmt:formatDate value="${item.eventDate}" pattern="dd-MM-yyyy" timeZone="${timeZone}" /></td>
						<td><fmt:formatDate value="${item.eventTime}" pattern="HH:mm" /></td>
						<!-- td><a href="${item.eventUri}">${item.eventUri}</a></td-->
						<td>${item.eventUri}</td>
						<!-- td><a href="/event/delete/${item.id}">Usuń</a></td -->
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</body>
</html>
